  :root {
      --bg: #F7F5F0;
      --surface: #FFFFFF;
      --text: #1A1A18;
      --muted: #7A7870;
      --accent: #3498db;
      --accent-light: #D8EFDF;
      --accent-hover: #1B4332;
      --border: #E4E2DC;
      --radius: 10px;
      --shadow: 0 2px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
      --popup-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    }
    /* ── POPUP CONTAINER ── */
    #popup-stack {
      position: fixed;
      bottom: 24px;
      left: 24px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: flex-start;
      z-index: 9999;
      pointer-events: none;
    }

    /* ── POPUP ITEM ── */
    .popup {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px 16px;
      min-width: 300px;
      max-width: 370px;
      display: flex;
      gap: 12px;
      align-items: center;
      box-shadow: var(--popup-shadow);
      pointer-events: all;
      opacity: 0;
      transform: translateX(24px) scale(0.97);
      transition: opacity .28s ease, transform .28s ease;
    }
    .popup.visible {
      opacity: 1;
      transform: translateX(0) scale(1);
    }
    .popup.hiding {
      opacity: 0;
      transform: translateX(24px) scale(0.97);
    }

    /* Accent strip kiri */
    .popup::before {
      content: '';
      position: absolute;
      left: 0; top: 10px; bottom: 10px;
      width: 3px;
      border-radius: 4px;
    }
    .popup { position: relative; padding-left: 20px; }
    .popup.type-success::before { background: var(--accent); }

    .popup-icon{
      width: 60px;
      height: 60px;
      flex-shrink: 0;

      display: flex;
      align-items: center;
      justify-content: center;
}

    .popup-icon img{
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
}
    .type-success .popup-icon { background: var(--accent-light); }

    .popup-body { flex: 1; min-width: 0; }
    .popup-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
    .popup-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
    .popup-action {
      margin-top: 12px;
}
    .popup-action button{
      background: var(--accent);
      color: #ffffff;
      border: none;
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all .2s ease;
      
    }
    .popup-action button:hover { 
      background: var(--accent-hover);
      transform: translateY(-1px);
      box-shadow: 0 4px 10px rgba(45, 106, 79, 0.25);
    }
    .popup-close {
      background: none; border: none; cursor: pointer;
      color: var(--muted); font-size: 16px; padding: 0;
      line-height: 1; flex-shrink: 0; margin-top: 1px;
    }
    .popup-close:hover { color: var(--text); }

    /* Progress bar */
    .popup-progress {
      position: absolute;
      bottom: 0; left: 0;
      height: 2px;
      border-radius: 0 0 14px 14px;
      background: var(--accent);
      animation: shrink linear forwards;
    }

@keyframes shrink {from { width: 100%; }to { width: 0%; } }