/* ==========================================================================
   APP SHELL — iOS 26 "Liquid Glass" (60/120fps Mobile GPU-Optimized Pipeline)
   Zero layout/paint/re-blur during Press, Hold & Scrub!
   ========================================================================== */

.app-header {
  position: sticky;
  top: 10px;
  z-index: 70;
  margin-top: 10px;
  padding: 0 12px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.app-header *,
.mobile-nav,
.mobile-nav * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

@media (min-width: 768px) {
  .app-header {
    top: 12px;
    margin-top: 12px;
    padding: 0 20px;
  }
}

.header-capsule {
  position: relative;
  max-width: 1148px;
  margin: 0 auto;
  border-radius: var(--r-pill);
  pointer-events: auto;
  /* Jaga geometri kapsul tetap stabil supaya GPU tidak perlu me-reblur backdrop-filter! */
  transform: translateZ(0);
}

/* ---------- Single Static GPU-Cached Refractive Glass Layer ---------- */
.glass-surface {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  contain: paint;
  transform: translateZ(0);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 252, 246, 0.46) 50%,
    rgba(255, 255, 255, 0.62) 100%
  );
  /* Kernel blur ringan & tajam untuk GPU HP mid/low (14px), lebih dalam di layar besar */
  backdrop-filter: blur(14px) saturate(185%);
  -webkit-backdrop-filter: blur(14px) saturate(185%);
  box-shadow:
    0 10px 28px -8px rgba(15, 24, 44, 0.15),
    0 3px 10px -2px rgba(15, 24, 44, 0.06),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.98),
    inset 1.5px 0 2px rgba(196, 228, 255, 0.44),
    inset -1.5px 0 2px rgba(255, 224, 163, 0.44),
    inset 0 -1.5px 1.5px rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
  .glass-surface {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.68) 0%,
      rgba(255, 252, 246, 0.4) 48%,
      rgba(255, 255, 255, 0.56) 100%
    );
    backdrop-filter: blur(22px) saturate(205%) brightness(1.04);
    -webkit-backdrop-filter: blur(22px) saturate(205%) brightness(1.04);
  }
}

/* Rim Spekular Diagonal 1.25px khas Apple Liquid Glass (statis, di-paint 1x saja!) */
.glass-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.25px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.38) 34%,
    rgba(214, 234, 255, 0.48) 54%,
    rgba(232, 180, 57, 0.38) 76%,
    rgba(255, 255, 255, 0.94) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Lapisan pendaran prisma saat ditahan (murni transisi opacity di GPU = 0ms Paint!) */
.glass-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(125, 211, 252, 0.22) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(251, 191, 36, 0.22) 100%
  );
  transition: opacity 0.18s ease;
}

.header-capsule.is-capsule-held .glass-surface::after,
.mobile-nav.is-capsule-held .glass-surface::after {
  opacity: 1;
}

/* Cahaya kursor khusus Desktop Mouse (digerakkan murni via translate3d, mati di HP) */
.glass-glare {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .glass-glare {
    display: block;
    position: absolute;
    top: -40px;
    left: -110px;
    width: 220px;
    height: 140px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(255, 244, 214, 0.18) 45%,
      rgba(255, 255, 255, 0) 70%
    );
    will-change: transform, opacity;
    transition: opacity 0.22s ease;
  }
}

.header-inner {
  position: relative;
  z-index: 2;
  padding: 7px 9px 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 8px 10px 8px 14px;
    gap: 14px;
  }
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  text-decoration: none;
  color: var(--navy-950);
  transition: transform 0.2s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.brand-link:active {
  transform: scale(0.95);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f3c852 0%, var(--gold-500) 100%);
  color: var(--navy-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow:
    0 4px 12px rgba(207, 150, 21, 0.32),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.82),
    inset 0 -1.5px 2px rgba(154, 109, 7, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
  min-width: 0;
  overflow: hidden;
}

.brand-name {
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  color: var(--navy-950);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.brand-sub {
  font-size: 0.67rem;
  color: var(--ink-700);
  font-weight: 600;
  opacity: 0.86;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
}

.class-badge-top {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease;
}

.class-badge-top i {
  color: var(--gold-600);
}

.class-badge-top:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.class-badge-top:active {
  transform: scale(0.95);
}

@media (min-width: 960px) {
  .class-badge-top:not([hidden]) {
    display: inline-flex;
  }
}

/* ---------- Desktop Segmented Liquid Glass Dock ---------- */
.desktop-nav {
  position: relative;
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: rgba(15, 24, 44, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1.5px 3px rgba(15, 24, 44, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.75);
  touch-action: none;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
}

/* ---------- Gelembung Kaca Geser (100% GPU Transform + Opacity Only!) ---------- */
.nav-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 84px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  transition:
    transform 0.46s cubic-bezier(0.22, 1.22, 0.36, 1),
    width 0.42s cubic-bezier(0.22, 1.22, 0.36, 1),
    opacity 0.18s ease;
}

/* KUNCI ANTI-LAG: Saat jari menggeser lensa, matikan CSS transition supaya 1:1 60/120fps via rAF! */
.nav-glider.is-scrubbing {
  transition: none !important;
}

.nav-glider-body {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--r-pill);
  transform: scale3d(1, 1, 1);
  transform-origin: center center;
  will-change: transform;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(255, 251, 242, 0.86) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 4px 12px -2px rgba(15, 24, 44, 0.12),
    inset 0 1.5px 1px #ffffff,
    inset 0 -1px 1.5px rgba(207, 150, 21, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 1.34, 0.36, 1);
}

/* Lapisan Lensa Kaca Prisma 3D (Pre-painted, menyala murni via opacity = 0ms lag di HP low-end!) */
.nav-glider-body::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  /* Efek optik lensa bening + pendaran prisma biru-kiri & emas-kanan tanpa double backdrop-blur! */
  background:
    radial-gradient(
      115% 95% at 50% 14%,
      rgba(255, 255, 255, 0.92) 0%,
      rgba(255, 255, 255, 0.25) 52%,
      rgba(255, 249, 232, 0.65) 100%
    ),
    linear-gradient(
      90deg,
      rgba(125, 211, 252, 0.5) 0%,
      rgba(255, 255, 255, 0.15) 26%,
      rgba(255, 255, 255, 0.15) 74%,
      rgba(251, 191, 36, 0.52) 100%
    );
  border: 1.5px solid #ffffff;
  box-shadow:
    0 10px 22px -4px rgba(15, 24, 44, 0.22),
    0 2px 8px rgba(232, 180, 57, 0.26),
    inset 0 2px 1.5px #ffffff,
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.9);
  will-change: opacity;
  transition: opacity 0.16s ease;
}

/* Efek Tetesan Cair Melar saat Slide Berpindah Tab */
@keyframes liquidSlideStretch {
  0% {
    transform: scale3d(1, 1, 1);
  }
  36% {
    transform: scale3d(1.07, 0.92, 1);
  }
  76% {
    transform: scale3d(0.98, 1.02, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}

.nav-glider.is-gliding:not(.is-lens) .nav-glider-body {
  animation: liquidSlideStretch 0.46s cubic-bezier(0.22, 1.22, 0.36, 1);
}

/* MODE LENSA KACA BESAR SAAT DITAHAN (Murni GPU scale3d + opacity!) */
.nav-glider.is-lens {
  z-index: 3;
}

.nav-glider.is-lens .nav-glider-body {
  background: rgba(255, 255, 255, 0.34);
  box-shadow: none;
  transition: transform 0.14s cubic-bezier(0.22, 1.28, 0.36, 1);
}

.nav-glider.is-scrubbing.is-lens .nav-glider-body {
  /* Saat aktif digeser jari, transform langsung dikendalikan rAF tanpa jeda transisi */
  transition: none;
}

.nav-glider.is-lens .nav-glider-body::after {
  opacity: 1;
}

.desktop-nav a {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  color: rgba(15, 24, 44, 0.84);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
  transition:
    color 0.16s ease,
    transform 0.18s cubic-bezier(0.22, 1.3, 0.36, 1),
    opacity 0.16s ease;
}

.desktop-nav a i {
  font-size: 0.82rem;
  opacity: 0.84;
  transition:
    color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.desktop-nav a:hover {
  color: var(--navy-950);
}

.desktop-nav:not(.is-lens-mode) a:active {
  transform: scale(0.95);
}

.desktop-nav:not(.is-lens-mode) a.active {
  color: var(--navy-950);
  font-weight: 800;
}

.desktop-nav:not(.is-lens-mode) a.active i {
  color: var(--gold-600);
  opacity: 1;
  transform: scale(1.07);
}

.desktop-nav.is-lens-mode a {
  z-index: 4;
  opacity: 0.72;
}

.desktop-nav.is-lens-mode a.lens-focus {
  opacity: 1;
  color: var(--navy-950);
  font-weight: 800;
  transform: scale(1.07);
}

.desktop-nav.is-lens-mode a.lens-focus i {
  color: var(--gold-600);
  opacity: 1;
  transform: scale(1.12);
}

.desktop-nav:not(.glider-ready) a.active {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(15, 24, 44, 0.1);
}

/* ---------- Profile Trigger & iOS Control Center Popover ---------- */
.account-menu-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 5;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.78) 0%,
    rgba(255, 252, 245, 0.58) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 3px 10px rgba(15, 24, 44, 0.07),
    inset 0 1px 0 #ffffff;
  color: var(--navy-950);
  padding: 4px 12px 4px 5px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 0.81rem;
  font-weight: 800;
  transition: transform 0.2s cubic-bezier(0.22, 1.32, 0.36, 1), background 0.18s ease;
}

.account-trigger:hover {
  background: rgba(255, 255, 255, 0.92);
}

.account-trigger:active {
  transform: scale(0.94);
}

.account-trigger.is-btn-held {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.95);
}

.account-ava {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy-900), var(--navy-950));
  color: var(--gold-400);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 6px rgba(15, 24, 44, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.28);
}

.account-name {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .account-name {
    max-width: 116px;
  }
}

.account-caret {
  font-size: 0.66rem;
  color: var(--ink-500);
  transition: transform 0.24s cubic-bezier(0.22, 1.28, 0.36, 1);
}

.account-trigger.open .account-caret {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 242px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(253, 249, 241, 0.78) 100%
  );
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  color: var(--ink-900);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 22px;
  box-shadow:
    0 20px 44px -10px rgba(15, 24, 44, 0.22),
    0 6px 14px -4px rgba(15, 24, 44, 0.08),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.98);
  padding: 7px;
  z-index: 100;
  transform-origin: top right;
  animation: iosPopoverIn 0.2s cubic-bezier(0.22, 1.26, 0.36, 1) both;
}

@keyframes iosPopoverIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.drop-header {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 24, 44, 0.07);
  margin-bottom: 5px;
}

.drop-header strong {
  display: block;
  font-size: 0.88rem;
  color: var(--navy-950);
}

.drop-header span {
  font-size: 0.74rem;
  color: var(--ink-500);
}

.drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: var(--navy-950);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, transform 0.14s ease;
}

.drop-item:hover {
  background: rgba(15, 24, 44, 0.065);
}

.drop-item:active {
  transform: scale(0.98);
}

.drop-item i {
  width: 16px;
  text-align: center;
  color: var(--gold-600);
}

.drop-item.danger,
.drop-item.danger i {
  color: var(--err-700);
}

.drop-item.danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

.drop-divider {
  height: 1px;
  background: rgba(15, 24, 44, 0.075);
  margin: 5px 8px;
}

/* ---------- Mobile iOS 26 Floating Liquid Glass Tab Bar (Zero Re-Blur!) ---------- */
.mobile-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  max-width: 430px;
  margin: 0 auto;
  z-index: 65;
  border-radius: var(--r-pill);
  padding: 5px 6px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  touch-action: none;
  /* Tetap statis (translateZ(0)) tanpa scale() pada parent backdrop-filter agar 0ms GPU lag di HP! */
  transform: translateZ(0);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav .nav-glider {
  top: 5px;
  bottom: 5px;
}

.mobile-nav a {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: var(--r-pill);
  color: rgba(15, 24, 44, 0.72);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 700;
  transition:
    color 0.16s ease,
    transform 0.18s cubic-bezier(0.22, 1.3, 0.36, 1),
    opacity 0.16s ease;
}

.mobile-nav:not(.is-lens-mode) a:active {
  transform: scale(0.92);
}

.mobile-nav a i {
  font-size: 0.96rem;
  transition:
    color 0.18s ease,
    transform 0.18s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.mobile-nav:not(.is-lens-mode) a.active {
  color: var(--navy-950);
  font-weight: 800;
}

.mobile-nav:not(.is-lens-mode) a.active i {
  color: var(--gold-600);
  transform: translateY(-1px) scale(1.07);
}

.mobile-nav.is-lens-mode a {
  z-index: 4;
  opacity: 0.7;
}

.mobile-nav.is-lens-mode a.lens-focus {
  opacity: 1;
  color: var(--navy-950);
  font-weight: 800;
  transform: translateY(-2px) scale(1.09);
}

.mobile-nav.is-lens-mode a.lens-focus i {
  color: var(--gold-600);
  transform: scale(1.14);
}

.mobile-nav:not(.glider-ready) a.active {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(15, 24, 44, 0.1);
}

/* ---------- Footer ---------- */
.app-footer {
  max-width: 1180px;
  margin: 12px auto 0;
  padding: 20px 16px 32px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-400);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.footer-links a {
  color: var(--ink-500);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--navy-900);
  text-decoration: underline;
}

/* ---------- Modal Dialog System ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(12, 18, 32, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0s 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease;
}

.modal-dialog {
  width: 100%;
  max-width: 400px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.22, 1.26, 0.36, 1);
}

.modal-dialog.wide {
  max-width: 500px;
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-950);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--bg-subtle);
  color: var(--ink-700);
  cursor: pointer;
  flex-shrink: 0;
}

.modal-body {
  font-size: 0.9rem;
  color: var(--ink-700);
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}

@media (min-width: 768px) {
  .toast-stack {
    bottom: 26px;
  }
}

.toast-item {
  background: rgba(15, 24, 44, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 4px solid var(--gold-400);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.2s ease both;
}

.toast-item.error {
  background: rgba(166, 30, 43, 0.92);
  border-left-color: #fff;
}

/* ---------- Fullscreen Lightbox (Images & PDFs) ---------- */
.lightbox-ov {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(10, 14, 24, 0.94);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0s 0.22s;
}

.lightbox-ov.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.lb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}

.lb-counter {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-200);
}

.lb-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: auto;
}

.lb-stage img {
  max-width: 94vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}

.lb-stage canvas {
  max-width: 94vw;
  max-height: 82vh;
  background: #fff;
  border-radius: 6px;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-nav.prev {
  left: 14px;
}

.lb-nav.next {
  right: 14px;
}
