/* RPC – All modals: review, import-preview, delete-confirm */

        /* ── REVIEW MODAL CARDS ───────────────────── */
        .rdc {
            display: flex;
            flex-direction: column;
            gap: 10px;
            gap: 12px;
            align-items: start;
            padding: 14px;
            background: var(--bg-surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            transition: border-color 0.15s;
        }
        .rdc:has(.rdc-cb:checked) { border-color: var(--accent); }
        .rdc-cb { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; margin-top: 3px; }
        .rdc-thumb { background: #232323; border-radius: 4px; padding: 8px; display: flex; align-items: center; justify-content: center; }
        .rdc-thumb img { width: 100%; height: auto; object-fit: contain; border-radius: 3px; display: block; }
        .rdc-info { min-width: 0; }
        .rdc-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
        .rdc-size { font-size: 11px; color: var(--text-dim); margin-bottom: 5px; }
        .rdc-lines { font-size: 11px; color: var(--text-dim); line-height: 1.7; }
        .rdc-line { display: flex; justify-content: space-between; gap: 8px; }
        .rdc-total { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
        .rdc-actions { display: flex; flex-direction: row; gap: 6px; flex-shrink: 0; align-items: flex-start; }
        .rdc-btn-edit { padding: 5px 10px; background: var(--accent); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600; }
        .rdc-btn-del { padding: 5px 8px; background: #dc3545; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
        #reviewTotal { padding: 12px 16px; background: var(--accent); border: none; border-radius: 6px; font-size: 14px; font-weight: 700; color: #fff; display: flex; justify-content: space-between; margin-top: 12px; }
        .review-modal-content { background: #ffffff !important; color: var(--text) !important; }
        .review-modal-content h2 { color: var(--accent) !important; }
        .review-modal-content .modal-actions { border-top: 1px solid #ddd; padding-top: 16px; margin-top: 0; }
        .rdc { background: #f5f5f5 !important; border: 1px solid #ddd !important; }
        .rdc:has(.rdc-cb:checked) { border-color: var(--accent) !important; background: #eef5fb !important; }
        .rdc-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
        .rdc-name { color: #111 !important; font-size: 14px !important; }
        .rdc-size { color: #555 !important; }
        .rdc-lines { color: #444 !important; }
        .rdc-line span { color: #333 !important; }
        .rdc-line span:last-child { color: #111 !important; font-weight: 500; }
        .rdc-cat-row {
            display: flex; justify-content: space-between; align-items: center;
            padding: 5px 0; font-size: 12px; font-weight: 700; cursor: pointer;
            border-bottom: 1px solid rgba(0,0,0,0.07); user-select: none;
        }
        .rdc-sub { padding-left: 10px; color: #555; }
        .rdc-total span { color: var(--accent) !important; }
        .rdc-thumb { background: transparent !important; padding: 0 !important; width: 100%; }
        #reviewTotal { background: var(--accent) !important; border: none !important; color: #fff !important; border-radius: 6px; }
        #reviewTotalAmt { color: #fff !important; }

        /* Custom modal (replaces browser alert/confirm) */
        .rover-modal-overlay {
            display: none; position: fixed; inset: 0; z-index: 99999;
            background: rgba(0,0,0,0.6); align-items: center; justify-content: center;
        }
        .rover-modal-overlay.active { display: flex; }
        .rover-modal {
            background: #2a2a2a; border: 1px solid #555; border-radius: 10px;
            padding: 24px 28px; max-width: 360px; width: 90%; box-shadow: 0 8px 40px rgba(0,0,0,0.7);
            font-family: 'Inter', sans-serif;
        }
        .rover-modal p { font-size: 14px; color: #fff; line-height: 1.6; margin: 0 0 20px; }
        .rover-modal .modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
        .rover-modal button {
            padding: 7px 18px; border-radius: 6px; font-size: 13px; font-weight: 600;
            cursor: pointer; border: none;
        }
        .rover-modal .btn-ok { background: var(--accent); color: #fff; }
        .rover-modal .btn-cancel { background: #444; color: #ccc; }
        .rover-modal .btn-ok:hover { background: #0a7ec4; }
        .rover-modal .btn-cancel:hover { background: #555; }

        /* ── IMPORT PREVIEW MODAL ──────────────────────────── */
        .import-modal-overlay {
            display: none; position: fixed; inset: 0; z-index: 999998;
            background: rgba(0,0,0,0.7); align-items: center; justify-content: center;
        }
        .import-modal-overlay.active { display: flex; }
        .import-modal {
            background: #1e1e1e; border: 1px solid #555; border-radius: 10px;
            padding: 24px; width: 560px; max-width: 95vw;
            box-shadow: 0 8px 40px rgba(0,0,0,0.8);
            font-family: 'Inter', sans-serif;
        }
        .import-modal h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: #fff; }
        .import-modal .import-meta { font-size: 12px; color: #888; margin: 0 0 14px; }
        .import-modal .import-thumb {
            width: 100%; border-radius: 6px; display: block; margin-bottom: 14px;
            background: #111; border: 1px solid #333;
        }
        .import-modal .import-question { font-size: 13px; color: #ccc; margin-bottom: 18px; }
        .import-modal .modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
        .import-modal .btn-ok { background: var(--accent); color: #fff; padding: 7px 18px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; }
        .import-modal .btn-cancel { background: #444; color: #ccc; padding: 7px 18px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; }
        .import-modal .btn-ok:hover { background: #0a7ec4; }
        .import-modal .btn-cancel:hover { background: #555; }

        /* ── DELETE CONFIRM MODAL ──────────────────────────── */
        .delete-modal-overlay {
            display: none; position: fixed; inset: 0; z-index: 999999;
            background: rgba(0,0,0,0.65); align-items: center; justify-content: center;
        }
        .delete-modal-overlay.active { display: flex; }
        .delete-modal {
            background: #2a2a2a; border: 1px solid #555; border-radius: 10px;
            padding: 28px 32px; max-width: 400px; width: 90%;
            box-shadow: 0 8px 40px rgba(0,0,0,0.7);
            font-family: 'Inter', sans-serif;
        }
        .delete-modal h3 {
            margin: 0 0 10px; font-size: 16px; font-weight: 700; color: #fff;
        }
        .delete-modal p {
            margin: 0 0 24px; font-size: 13px; color: #bbb; line-height: 1.6;
        }
        .delete-modal-actions {
            display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
        }
        .delete-modal-actions button {
            padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
            cursor: pointer; border: none; white-space: nowrap;
        }
        .dm-save-close  { background: var(--accent); color: #fff; }
        .dm-save-close:hover { background: #0a7ec4; }
        .dm-close-now   { background: #444; color: #ccc; }
        .dm-close-now:hover { background: #555; }
        .dm-cancel      { background: transparent; color: #888; border: 1px solid #555 !important; }
        .dm-cancel:hover { color: #ccc; border-color: #888 !important; }

