/* AnomicFlip — notification bell, panel and pop-up toasts */
.nt, .nt *, .nt-toasts, .nt-toasts * { box-sizing: border-box; }

/* bell sits at the right end of the row under the header */
.nt { position: relative; margin-left: auto; font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.nt-bell {
  position: relative; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: transparent; color: #c9ccd1; cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.nt-bell:hover, .nt.open .nt-bell { background: #24272c; color: #fff; }
.nt-bell:focus-visible { outline: 2px solid #3fd68f; outline-offset: 2px; }
.nt-badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: #3fd68f; color: #0d1f16;
  font: 800 11px/18px 'Archivo', system-ui, sans-serif; text-align: center;
}
.nt-badge[hidden] { display: none; }

.nt-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 950;
  width: min(460px, calc(100vw - 32px)); max-height: min(620px, 70vh);
  display: flex; flex-direction: column;
  background: #1a1d20; border: 1px solid #2e3238; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.nt.open .nt-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s; }
.nt-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.nt-head b { font-size: 18px; color: #fff; }
.nt-head button { border: 0; background: none; color: #8b8f97; font: 600 14px 'Archivo', system-ui, sans-serif; cursor: pointer; }
.nt-head button:hover { color: #fff; }
.nt-list { overflow-y: auto; padding: 0 10px 10px; display: grid; gap: 8px; scrollbar-width: thin; scrollbar-color: #33373e transparent; }
.nt-empty { padding: 28px 10px 34px; text-align: center; color: #6b7078; font-size: 15px; }

/* one notification (used in the panel and as a toast) */
.nt-item {
  position: relative; display: flex; gap: 16px; padding: 18px 48px 18px 18px;
  background: #23262b; border-radius: 10px; color: #fff;
}
.nt-item.unread::before { content: ''; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #3fd68f; }
.nt-ic { flex: none; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: rgba(63,214,143,.12); color: #3fd68f; }
.nt-ic.t-withdraw { background: rgba(245,200,74,.12); color: #f5c84a; }
.nt-ic.t-login { background: rgba(91,140,255,.14); color: #7aa2ff; }
.nt-ic.t-info { background: rgba(201,204,209,.10); color: #c9ccd1; }
.nt-txt { min-width: 0; }
.nt-title { font-size: 18px; font-weight: 800; }
.nt-body { margin-top: 6px; font-size: 16px; line-height: 1.4; color: #9a9ea6; overflow-wrap: anywhere; }
.nt-time { margin-top: 10px; font-size: 14px; color: #7d8189; }
.nt-x {
  position: absolute; top: 14px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 6px;
  background: none; color: #8b8f97; cursor: pointer; display: grid; place-items: center;
}
.nt-x:hover { background: #2c3036; color: #fff; }

/* toasts */
.nt-toasts {
  position: fixed; z-index: 1100; right: 16px; top: calc(var(--bar-h, 91px) + 72px);
  width: min(460px, calc(100vw - 32px)); display: grid; gap: 10px; pointer-events: none;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.nt-toasts .nt-item {
  pointer-events: auto; background: #1e2125; border: 1px solid #2e3238; box-shadow: 0 18px 40px rgba(0,0,0,.5);
  animation: nt-in .25s ease-out;
}
.nt-toasts .nt-item.out { animation: nt-out .2s ease-in forwards; }
.nt-toasts .nt-item::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px;
  background: #3fd68f; opacity: .6; transform-origin: left; animation: nt-timer var(--life, 6s) linear forwards;
}
@keyframes nt-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes nt-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes nt-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .nt-panel { transition: none; }
  .nt-toasts .nt-item, .nt-toasts .nt-item.out { animation: none; }
  .nt-toasts .nt-item::after { display: none; }
}

/* "Reconnecting…" pill (public/live.js) while the server restarts */
.af-reconnect { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 2000; padding: 10px 18px; border-radius: 99px; background: #2a2d33; color: #f5c84a; font: 700 15px 'Archivo', system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: flex; align-items: center; gap: 10px; }
.af-reconnect::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: af-r .7s linear infinite; }
.af-reconnect[hidden] { display: none; }
@keyframes af-r { to { transform: rotate(360deg); } }
