/* ===============================
   POPUP OVERLAY
================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.popup-overlay.hidden {
    display: none;
}

/* ===============================
   MODAL BOX
================================ */
.popup-modal {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    overflow: hidden;
    animation: popupScale 0.2s ease;
    color: #111827; /* ⬅️ PAKSA WARNA TEKS */
}

/* animation */
@keyframes popupScale {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ===============================
   HEADER
================================ */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.popup-header h3 {
    font-size: 16px;
    margin: 0;
    color: #111827;
}

.popup-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: #6b7280;
}

.popup-close:hover {
    color: #111827;
}

/* ===============================
   BODY
================================ */
.popup-body {
    padding: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.popup-body p {
    margin: 4px 0;
    color: #111827;
}

.popup-body hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 10px 0;
}

/* highlight */
.popup-body strong {
    color: #111827;
}

.popup-body .total {
    font-size: 16px;
    font-weight: bold;
    color: #0fb26a;
}

/* ===============================
   FOOTER / ACTIONS
================================ */
.popup-footer {
    padding: 14px 18px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
}

/* ===============================
   BUTTONS
================================ */
.popup-btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.popup-btn.primary {
    background: #0fb26a;
    color: #ffffff;
}

.popup-btn.secondary {
    background: #e5e7eb;
    color: #111827;
}

.popup-btn.danger {
    background: #ef4444;
    color: #ffffff;
}

/* ===============================
   STATUS COLOR (TOP BORDER)
================================ */
.popup-info    { border-top: 4px solid #3b82f6; }
.popup-success { border-top: 4px solid #22c55e; }
.popup-error   { border-top: 4px solid #ef4444; }
.popup-loading { border-top: 4px solid #f59e0b; }

/* ===============================
   LOADING SPINNER
================================ */
.popup-loading-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #0fb26a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 12px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

