/* =========================================================
           🛒 ATM LYNK.ID CHECKOUT STYLES - INTISARI APPS
           ========================================================= */
        :root {
            --brand-navy: #0D2F6D;
            --brand-blue: #1A73E8;
            --brand-blue-hover: #1557B0;
            --brand-teal: #00BFA5;
            --brand-teal-bg: #E6F8F5;
            --brand-green: #10B981;
            --surface-card: #FFFFFF;
            --surface-bg: #F8FAFC;
            --border-color: #E2E8F0;
            --text-main: #0F172A;
            --text-muted: #64748B;
        }

        body {
            background-color: var(--surface-bg);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            color: var(--text-main);
            margin: 0;
            padding: 0;
            -webkit-font-smoothing: antialiased;
        }

        .checkout-atm-container {
            max-width: 960px;
            margin: 2rem auto 4.5rem;
            padding: 0 1rem;
            box-sizing: border-box;
        }

        .checkout-title-bar {
            text-align: center;
            margin-bottom: 2rem;
        }
        .checkout-title-bar h1 {
            font-family: 'Poppins', sans-serif;
            font-size: 1.85rem;
            font-weight: 700;
            color: var(--brand-navy);
            margin: 0 0 0.4rem;
        }
        .checkout-title-bar p {
            color: var(--text-muted);
            font-size: 0.95rem;
            margin: 0;
        }

        /* 2-Column Grid Layout */
        .checkout-atm-grid {
            display: grid;
            grid-template-columns: 1.25fr 1fr;
            gap: 1.75rem;
            align-items: start;
        }

        @media (max-width: 860px) {
            .checkout-atm-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
        }

        /* Kartu Bersih Putih */
        .atm-card {
            background: var(--surface-card);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            padding: 1.5rem;
            box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
            margin-bottom: 1.5rem;
            box-sizing: border-box;
        }

        .atm-card-label {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-muted);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* 1. PRODUCT CARD (Left) */
        .atm-product-row {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        .atm-product-qty {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--text-muted);
            flex-shrink: 0;
        }
        .atm-product-thumb {
            width: 52px;
            height: 52px;
            background: #F1F5F9;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            flex-shrink: 0;
        }
        .atm-product-thumb img {
            width: 36px;
            height: 36px;
            object-fit: contain;
        }
        .atm-product-info {
            flex: 1;
            min-width: 0;
        }
        .atm-product-top {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.4rem;
        }
        .atm-product-name {
            font-size: 0.98rem;
            font-weight: 700;
            color: var(--brand-navy);
            margin: 0;
            line-height: 1.3;
        }
        .atm-product-price {
            font-size: 1.05rem;
            font-weight: 800;
            color: var(--text-main);
            text-align: right;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .atm-product-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--brand-teal);
            background: var(--brand-teal-bg);
            padding: 0.2rem 0.55rem;
            border-radius: 6px;
            white-space: nowrap;
        }

        /* Responsive Mobile Layout (Anti-Cramped) */
        @media (max-width: 600px) {
            .checkout-atm-container {
                margin: 1.25rem auto 3.5rem;
                padding: 0 0.85rem;
            }
            .checkout-title-bar {
                margin-bottom: 1.25rem;
            }
            .checkout-title-bar h1 {
                font-size: 1.5rem;
                margin-bottom: 0.25rem;
            }
            .checkout-title-bar p {
                font-size: 0.85rem;
            }
            .atm-card {
                padding: 1.15rem 1rem;
                border-radius: 14px;
                margin-bottom: 1.15rem;
            }
            .atm-card-label {
                font-size: 0.72rem;
                letter-spacing: 0.5px;
                margin-bottom: 0.75rem;
            }
            .atm-product-row {
                gap: 0.75rem;
            }
            .atm-product-thumb {
                width: 46px;
                height: 46px;
                border-radius: 8px;
            }
            .atm-product-thumb img {
                width: 32px;
                height: 32px;
            }
            .atm-product-name {
                font-size: 0.92rem;
            }
            .atm-product-price {
                font-size: 0.98rem;
            }
            .atm-product-badge {
                font-size: 0.68rem;
                padding: 0.15rem 0.45rem;
            }
            .atm-form-group {
                margin-bottom: 1rem;
            }
            .atm-form-group label {
                font-size: 0.82rem;
                margin-bottom: 0.3rem;
            }
            .atm-form-group input {
                padding: 0.75rem 0.85rem;
                font-size: 0.92rem;
                border-radius: 8px;
            }
            .atm-detail-row {
                font-size: 0.88rem;
                margin-bottom: 0.6rem;
            }
            .atm-detail-total {
                font-size: 1.05rem;
                padding-top: 0.75rem;
                margin-top: 0.75rem;
                margin-bottom: 1rem;
            }
            .atm-total-amount {
                font-size: 1.25rem;
            }
            .btn-add-voucher-trigger {
                padding: 0.75rem 0.85rem;
                font-size: 0.88rem;
            }
            .payment-method-trigger-card {
                padding: 0.75rem 0.85rem;
                margin-bottom: 1rem;
            }
            .pm-trigger-text {
                font-size: 0.9rem;
            }
            .pm-trigger-sub {
                font-size: 0.74rem;
            }
            .secure-payment-badge {
                padding: 0.65rem 0.8rem;
                gap: 0.6rem;
                margin-bottom: 1rem;
            }
            .secure-icon {
                width: 28px;
                height: 28px;
            }
            .secure-text h4 {
                font-size: 0.78rem;
            }
            .secure-text p {
                font-size: 0.7rem;
            }
            .agreement-box {
                font-size: 0.78rem;
                margin-bottom: 1rem;
            }
            .btn-buy-now {
                padding: 0.85rem 1rem;
                font-size: 0.98rem;
                min-height: 48px;
            }
        }

        /* 2. BUYER INFO FORM (Left) */
        .atm-form-group {
            margin-bottom: 1.25rem;
        }
        .atm-form-group:last-child {
            margin-bottom: 0;
        }
        .atm-form-group label {
            display: block;
            font-size: 0.86rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 0.4rem;
        }
        .atm-form-group label span.req {
            color: #EF4444;
        }
        .atm-form-group input {
            width: 100%;
            padding: 0.85rem 1rem;
            border: 1px solid #CBD5E1;
            border-radius: 10px;
            font-size: 0.95rem;
            font-family: inherit;
            color: var(--text-main);
            background: #FFFFFF;
            box-sizing: border-box;
            transition: all 0.2s ease;
        }
        .atm-form-group input:focus {
            outline: none;
            border-color: var(--brand-blue);
            box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
        }
        .atm-form-group input.invalid {
            border-color: #EF4444;
            background: #FEF2F2;
        }
        .error-message {
            color: #EF4444;
            font-size: 0.78rem;
            margin-top: 0.35rem;
            display: block;
        }

        /* 3. PAYMENT DETAIL CARD (Right) */
        .atm-payment-summary-card {
            position: sticky;
            top: 5rem;
        }
        .atm-detail-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.92rem;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .atm-detail-row strong {
            color: var(--text-main);
            font-weight: 600;
        }
        .atm-detail-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 1.15rem;
            font-weight: 800;
            color: var(--brand-navy);
            padding-top: 1rem;
            margin-top: 1rem;
            border-top: 1px dashed #CBD5E1;
            margin-bottom: 1.25rem;
        }
        .atm-total-amount {
            font-size: 1.35rem;
            color: var(--brand-blue);
        }

        /* Button: % Add Voucher */
        .btn-add-voucher-trigger {
            width: 100%;
            background: #FFFFFF;
            border: 1.5px dashed var(--brand-blue);
            color: var(--brand-blue);
            font-size: 0.92rem;
            font-weight: 700;
            padding: 0.8rem 1rem;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            transition: all 0.2s ease;
            box-sizing: border-box;
        }
        .btn-add-voucher-trigger:hover {
            background: rgba(26, 115, 232, 0.05);
            border-color: var(--brand-blue-hover);
        }
        .voucher-applied-pill {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #ECFDF5;
            border: 1px solid #A7F3D0;
            border-radius: 10px;
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            color: #065F46;
            font-size: 0.88rem;
            font-weight: 600;
        }
        .voucher-applied-pill button {
            background: none;
            border: none;
            color: #991B1B;
            font-weight: 700;
            cursor: pointer;
            padding: 0.2rem 0.5rem;
        }

        /* Card Button: Select Payment Method */
        .payment-method-trigger-card {
            background: #FFFFFF;
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            padding: 0.9rem 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.25rem;
            transition: all 0.2s ease;
            box-sizing: border-box;
        }
        .payment-method-trigger-card:hover {
            border-color: var(--brand-blue);
            box-shadow: 0 4px 12px rgba(26, 115, 232, 0.08);
        }
        .pm-trigger-left {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .pm-trigger-icon-box {
            width: 44px;
            height: 32px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #F8FAFC;
            flex-shrink: 0;
            padding: 2px;
            box-sizing: border-box;
        }
        .pm-trigger-icon-box img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        .pm-trigger-text {
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--text-main);
        }
        .pm-trigger-sub {
            font-size: 0.78rem;
            color: var(--text-muted);
            font-weight: 500;
        }
        .pm-trigger-arrow {
            color: #94A3B8;
            font-size: 1.2rem;
            font-weight: 700;
        }

        /* Secure Payment Box */
        .secure-payment-badge {
            background: #F8FAFC;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 0.75rem 0.95rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1.25rem;
        }
        .secure-icon {
            width: 32px;
            height: 32px;
            background: #ECFDF5;
            color: #10B981;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .secure-text h4 {
            margin: 0 0 0.15rem;
            font-size: 0.82rem;
            font-weight: 700;
            color: var(--brand-navy);
        }
        .secure-text p {
            margin: 0;
            font-size: 0.74rem;
            color: var(--text-muted);
            line-height: 1.35;
        }

        /* Agreement Checkbox */
        .agreement-box {
            font-size: 0.82rem;
            color: var(--text-muted);
            margin-bottom: 1.25rem;
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            line-height: 1.4;
        }
        .agreement-box input {
            margin-top: 0.15rem;
            accent-color: var(--brand-blue);
        }
        .agreement-box a {
            color: var(--brand-blue);
            text-decoration: underline;
        }

        /* Big CTA Button */
        .btn-buy-now {
            width: 100%;
            background: var(--brand-blue);
            color: #FFFFFF !important;
            font-size: 1.05rem;
            font-weight: 800;
            padding: 0.95rem 1rem;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            box-shadow: 0 6px 18px rgba(26, 115, 232, 0.35);
            transition: all 0.2s ease;
            box-sizing: border-box;
            min-height: 50px;
        }
        .btn-buy-now:hover {
            background: var(--brand-blue-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(26, 115, 232, 0.45);
        }
        .btn-buy-now:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        /* =========================================================
           🪟 MODAL POP-UPS (Payment Method & Voucher)
           ========================================================= */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            box-sizing: border-box;
            opacity: 0;
            visibility: hidden;
            transition: all 0.25s ease;
        }
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-window {
            background: #FFFFFF;
            width: 100%;
            max-width: 480px;
            border-radius: 18px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            max-height: 85vh;
            transform: translateY(20px) scale(0.96);
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .modal-overlay.active .modal-window {
            transform: translateY(0) scale(1);
        }

        .modal-header {
            padding: 1.15rem 1.25rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--brand-navy);
            font-family: 'Poppins', sans-serif;
        }
        .modal-close-btn {
            background: none;
            border: none;
            font-size: 1.4rem;
            color: #94A3B8;
            cursor: pointer;
            padding: 0.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            transition: color 0.2s;
        }
        .modal-close-btn:hover {
            color: #0F172A;
            background: #F1F5F9;
        }

        .modal-body {
            padding: 1.25rem;
            overflow-y: auto;
            flex: 1;
        }

        .modal-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-color);
            background: #F8FAFC;
        }

        /* Payment Group in Modal */
        .pm-group-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin: 1.25rem 0 0.65rem;
        }
        .pm-group-title:first-child {
            margin-top: 0;
        }

        .pm-option-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 0.85rem;
            border: 1.5px solid var(--border-color);
            border-radius: 10px;
            margin-bottom: 0.65rem;
            cursor: pointer;
            transition: all 0.2s ease;
            background: #FFFFFF;
        }
        .pm-option-item:hover {
            border-color: var(--brand-blue);
            background: #F8FAFC;
        }
        .pm-option-item.selected {
            border-color: var(--brand-blue);
            background: rgba(26, 115, 232, 0.04);
            box-shadow: 0 0 0 1px var(--brand-blue);
        }
        .pm-option-left {
            display: flex;
            align-items: center;
            gap: 0.85rem;
        }
        .pm-option-logo {
            width: 58px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            border-radius: 6px;
            padding: 3px 6px;
            box-sizing: border-box;
        }
        .pm-option-logo img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        .pm-option-name {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--text-main);
            margin: 0;
        }
        .pm-option-fee {
            font-size: 0.75rem;
            color: #10B981;
            font-weight: 600;
            margin: 0;
        }
        .pm-radio-circle {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid #CBD5E1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .pm-option-item.selected .pm-radio-circle {
            border-color: var(--brand-blue);
            background: var(--brand-blue);
        }
        .pm-option-item.selected .pm-radio-circle::after {
            content: '';
            width: 6px;
            height: 6px;
            background: #FFFFFF;
            border-radius: 50%;
        }

        .btn-confirm-modal {
            width: 100%;
            background: var(--brand-blue);
            color: #FFFFFF;
            font-size: 0.95rem;
            font-weight: 700;
            padding: 0.85rem;
            border-radius: 10px;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .btn-confirm-modal:hover {
            background: var(--brand-blue-hover);
        }

        /* Voucher Modal Chips */
        .voucher-input-row {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.25rem;
        }
        .voucher-input-row input {
            flex: 1;
            padding: 0.8rem 1rem;
            border: 1px solid #CBD5E1;
            border-radius: 8px;
            font-size: 0.95rem;
            text-transform: uppercase;
        }
        .voucher-input-row button {
            background: var(--brand-blue);
            color: #FFFFFF;
            border: none;
            padding: 0.8rem 1.2rem;
            border-radius: 8px;
            font-weight: 700;
            cursor: pointer;
        }
        .voucher-suggest-box {
            background: #F8FAFC;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 1rem;
        }
        .voucher-suggest-title {
            font-size: 0.82rem;
            font-weight: 700;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        .voucher-chip {
            background: #FFFFFF;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 0.65rem 0.85rem;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .voucher-chip:hover {
            border-color: var(--brand-blue);
            background: #EFF6FF;
        }
        .voucher-chip strong {
            color: var(--brand-blue);
            font-size: 0.88rem;
        }
        .voucher-chip span {
            font-size: 0.78rem;
            color: #10B981;
            font-weight: 600;
        }
        .voucher-status-msg {
            margin-top: 0.75rem;
            font-size: 0.85rem;
            font-weight: 600;
            display: none;
        }